package com.program.art.refator.vcd;

import com.program.art.refator.vcd.calculator.*;

public class Movie {
    private String title;
    private MovieCalculator calculator;

    public Movie(String title, MovieCalculator calculator) {
        this.title = title;
        this.calculator = calculator;
    }

    public String getTitle() {
        return title;
    }

    public double calculateAmount(int daysRented) {
        return calculator.calculateAmount(daysRented);
    }

    public int calculatePoints(int daysRented) {
        return calculator.calculatePoints(daysRented);
    }

    @Override
    public String toString() {
        return "Movie{" +
                "title='" + title + '\'' +
                ", calculator=" + calculator +
                '}';
    }
}
